﻿<Serializable()> _
Public Class ItemUI
    Inherits BaseDominio

    Private _controlTypeID As String
    Public Overridable Property ControlTypeID() As String
        Get
            Return _controlTypeID
        End Get
        Set(ByVal value As String)
            _controlTypeID = value
        End Set
    End Property


    Private _x As Integer
    Public Overridable Property X() As Integer
        Get
            Return _x
        End Get
        Set(ByVal value As Integer)
            _x = value
        End Set
    End Property

    Private _y As Integer
    Public Overridable Property Y() As Integer
        Get
            Return _y
        End Get
        Set(ByVal value As Integer)
            _y = value
        End Set
    End Property


    Private _isInGroup As Integer
    Public Overridable Property isInGroup() As Integer
        Get
            Return _isInGroup
        End Get
        Set(ByVal value As Integer)
            _isInGroup = value
        End Set
    End Property

    Private _measuredW As Integer
    Public Overridable Property measuredW() As Integer
        Get
            Return _measuredW
        End Get
        Set(ByVal value As Integer)
            _measuredW = value
        End Set
    End Property

    Private _controlId As Integer
    Public Overridable Property ControlId() As Integer
        Get
            Return _controlId
        End Get
        Set(ByVal value As Integer)
            _controlId = value
        End Set
    End Property

    Private _measuredH As Integer
    Public Overridable Property measuredH() As Integer
        Get
            Return _measuredH
        End Get
        Set(ByVal value As Integer)
            _measuredH = value
        End Set
    End Property

    Private _tipoComponente As TipoComponente
    Public Overridable Property TipoComponente() As TipoComponente
        Get
            Return _tipoComponente
        End Get
        Set(ByVal value As TipoComponente)
            _tipoComponente = value
        End Set
    End Property

    Private _ui As UI
    Public Overridable Property UI() As UI
        Get
            Return _ui
        End Get
        Set(ByVal value As UI)
            _ui = value
        End Set
    End Property

    Private _propriedade As Propriedade
    Public Overridable Property Propriedade() As Propriedade
        Get
            Return _propriedade
        End Get
        Set(ByVal value As Propriedade)
            _propriedade = value
        End Set
    End Property

#Region "Negocio"

    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub New(ByVal _control As control, ByRef _ui As UI)
        MyBase.New()

        With _control
            Me.ControlId = .ControlId
            Me.ControlTypeID = .ControlTypeID
            Me.isInGroup = .isInGroup
            Me.measuredH = .measuredH
            Me.measuredW = .measuredW
            Me.X = .X
            Me.Y = .Y
            Me.UI = _ui

            If _control.controlProperties IsNot Nothing Then
                Dim _propriedade As Propriedade
                Dim _texto As String
                _propriedade = New Propriedade
                '_texto = _control.controlProperties.Text.Replace("%0A", vbCrLf)
                If _control.controlProperties IsNot Nothing AndAlso Not String.IsNullOrEmpty(_control.controlProperties.Text) Then
                    _texto = _control.controlProperties.Text.Replace("%0A", "||")
                    'ENCONTRAR ALTERNATIVAS : http://www.macoratti.net/11/12/aspn_ed1.htm
                    '· Server.HtmlEncode()
                    '· Server.HtmlDecode()
                    '· Server.HtmlUrlEncode()
                    '· Server.HtmlUrlDecode ()
                    '· HttpUtility.UrlEncode()
                    '· HttpUtility.UrlDecode ()
                    _texto = System.Web.HttpUtility.UrlDecode(_texto, Text.Encoding.Default)
                    _propriedade.Text = _texto
                Else
                    _propriedade.Text = ""
                End If
                Me.Propriedade = _propriedade
                Me.Propriedade.ItemUI = Me

            End If

            Select Case .ControlTypeID
                Case "com.balsamiq.mockups::Accordion"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Accordion
                Case "com.balsamiq.mockups::Alert"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Alert
                Case "com.balsamiq.mockups::BarChart"
                    Me.TipoComponente = MockupGenerator.TipoComponente.BarChart
                Case "com.balsamiq.mockups::BreadCrumbs"
                    Me.TipoComponente = MockupGenerator.TipoComponente.BreadCrumbs
                Case "com.balsamiq.mockups::Button"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Button
                Case "com.balsamiq.mockups::ButtonBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.ButtonBar
                Case "com.balsamiq.mockups::Calendar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Calendar
                Case "com.balsamiq.mockups::CallOut"
                    Me.TipoComponente = MockupGenerator.TipoComponente.CallOut
                Case "com.balsamiq.mockups::Canvas"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Canvas
                Case "com.balsamiq.mockups::CheckBox"
                    Me.TipoComponente = MockupGenerator.TipoComponente.CheckBox
                Case "com.balsamiq.mockups::CheckBoxGroup"
                    Me.TipoComponente = MockupGenerator.TipoComponente.CheckBoxGroup
                Case "com.balsamiq.mockups::ColorPicker"
                    Me.TipoComponente = MockupGenerator.TipoComponente.ColorPicker
                Case "com.balsamiq.mockups::ColumnChart"
                    Me.TipoComponente = MockupGenerator.TipoComponente.ColumnChart
                Case "com.balsamiq.mockups::ComboBox"
                    Me.TipoComponente = MockupGenerator.TipoComponente.ComboBox
                Case "com.balsamiq.mockups::DataGrid"
                    Me.TipoComponente = MockupGenerator.TipoComponente.DataGrid
                Case "com.balsamiq.mockups::DateChooser"
                    Me.TipoComponente = MockupGenerator.TipoComponente.DateChooser
                Case "com.balsamiq.mockups::FieldSet"
                    Me.TipoComponente = MockupGenerator.TipoComponente.FieldSet
                Case "com.balsamiq.mockups::FormattingToolbar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.FormattingToolbar
                Case "com.balsamiq.mockups::HelpButton"
                    Me.TipoComponente = MockupGenerator.TipoComponente.HelpButton
                Case "com.balsamiq.mockups::HorizontalScrollBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.HorizontalScrollBar
                Case "com.balsamiq.mockups::HRule"
                    Me.TipoComponente = MockupGenerator.TipoComponente.HRule
                Case "com.balsamiq.mockups::HSlider"
                    Me.TipoComponente = MockupGenerator.TipoComponente.HSlider
                Case "com.balsamiq.mockups::HSplitter"
                    Me.TipoComponente = MockupGenerator.TipoComponente.HSplitter
                Case "com.balsamiq.mockups::Icon"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Icon
                Case "com.balsamiq.mockups::IconLabel"
                    Me.TipoComponente = MockupGenerator.TipoComponente.IconLabel
                Case "com.balsamiq.mockups::Image"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Image
                Case "com.balsamiq.mockups::Label"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Label
                Case "com.balsamiq.mockups::Link"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Link
                Case "com.balsamiq.mockups::LinkBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.LinkBar
                Case "com.balsamiq.mockups::List"
                    Me.TipoComponente = MockupGenerator.TipoComponente.List
                Case "com.balsamiq.mockups::Map"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Map
                Case "com.balsamiq.mockups::MediaControls"
                    Me.TipoComponente = MockupGenerator.TipoComponente.MediaControls
                Case "com.balsamiq.mockups::MenuBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.MenuBar
                Case "com.balsamiq.mockups::ModalScreen"
                    Me.TipoComponente = MockupGenerator.TipoComponente.ModalScreen
                Case "com.balsamiq.mockups::MultilineButton"
                    Me.TipoComponente = MockupGenerator.TipoComponente.MultilineButton
                Case "com.balsamiq.mockups::NumericStepper"
                    Me.TipoComponente = MockupGenerator.TipoComponente.NumericStepper
                Case "com.balsamiq.mockups::Paragraph"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Paragraph
                Case "com.balsamiq.mockups::PieChart"
                    Me.TipoComponente = MockupGenerator.TipoComponente.PieChart
                Case "com.balsamiq.mockups::PointyButton"
                    Me.TipoComponente = MockupGenerator.TipoComponente.PointyButton
                Case "com.balsamiq.mockups::RadioButton"
                    Me.TipoComponente = MockupGenerator.TipoComponente.RadioButton
                Case "com.balsamiq.mockups::RadioButtonGroup"
                    Me.TipoComponente = MockupGenerator.TipoComponente.RadioButtonGroup
                Case "com.balsamiq.mockups::RoundButton"
                    Me.TipoComponente = MockupGenerator.TipoComponente.RoundButton
                Case "com.balsamiq.mockups::SearchBox"
                    Me.TipoComponente = MockupGenerator.TipoComponente.SearchBox
                Case "com.balsamiq.mockups::SiteMap"
                    Me.TipoComponente = MockupGenerator.TipoComponente.SiteMap
                Case "com.balsamiq.mockups::StickyNote"
                    Me.TipoComponente = MockupGenerator.TipoComponente.StickyNote
                Case "com.balsamiq.mockups::SubTitle"
                    Me.TipoComponente = MockupGenerator.TipoComponente.SubTitle
                Case "com.balsamiq.mockups::Switch"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Switch
                Case "com.balsamiq.mockups::TabBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.TabBar
                Case "com.balsamiq.mockups::TagCloud"
                    Me.TipoComponente = MockupGenerator.TipoComponente.TagCloud
                Case "com.balsamiq.mockups::TextArea"
                    Me.TipoComponente = MockupGenerator.TipoComponente.TextArea
                Case "com.balsamiq.mockups::TextInput"
                    Me.TipoComponente = MockupGenerator.TipoComponente.TextInput
                Case "com.balsamiq.mockups::Title"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Title
                Case "com.balsamiq.mockups::TitleWindow"
                    Me.TipoComponente = MockupGenerator.TipoComponente.TitleWindow
                Case "com.balsamiq.mockups::Tooltip"
                    Me.TipoComponente = MockupGenerator.TipoComponente.Tooltip
                Case "com.balsamiq.mockups::VerticalScrollBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.VerticalScrollBar
                Case "com.balsamiq.mockups::VerticalTabBar"
                    Me.TipoComponente = MockupGenerator.TipoComponente.VerticalTabBar
                Case "com.balsamiq.mockups::VideoPlayer"
                    Me.TipoComponente = MockupGenerator.TipoComponente.VideoPlayer
                Case "com.balsamiq.mockups::VolumeSlider"
                    Me.TipoComponente = MockupGenerator.TipoComponente.VolumeSlider
                Case "com.balsamiq.mockups::VSplitter"
                    Me.TipoComponente = MockupGenerator.TipoComponente.VSplitter
                Case Else
                    Me.TipoComponente = MockupGenerator.TipoComponente.Desconhecido
            End Select

            'Case "com.balsamiq.mockups::Button"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.Button
            'Case "com.balsamiq.mockups::ComboBox"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.ComboBox
            'Case "com.balsamiq.mockups::DataGrid"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.Grid
            'Case "com.balsamiq.mockups::CheckBox"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.CheckBox
            'Case "com.balsamiq.mockups::Label"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.Label
            'Case "com.balsamiq.mockups::TextArea"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.TextArea
            'Case "com.balsamiq.mockups::MenuBar"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.MenuBar
            'Case "com.balsamiq.mockups::RadioButton"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.RadioButton
            'Case "com.balsamiq.mockups::RadioButtonGroup"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.RadioButtonGroup
            'Case "com.balsamiq.mockups::TextInput"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.TextInput
            'Case "com.balsamiq.mockups::Link"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.Link
            'Case "com.balsamiq.mockups::NumericStepper"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.NumericStepper
            'Case "com.balsamiq.mockups::Tooltip"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.Tooltip
            'Case "com.balsamiq.mockups::TagCloud"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.TagCloud
            'Case "com.balsamiq.mockups::List"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.List
            'Case "com.balsamiq.mockups::VerticalTabBar"
            '    Me.TipoComponente = MockupGenerator.TipoComponente.VerticalTabBar

        End With

    End Sub

    Public Overridable Function Buscar(ByVal _id As Long) As ItemUI
        Return MyBase.ItemUIDao.Buscar(_id)
    End Function

    Public Overridable Sub Salvar()
        MyBase.ItemUIDao.Salvar(Me)
    End Sub

    Protected Function GetGridHeader() As String
        Dim _texto As String = Me.Propriedade.Text
        Dim _linhasArrayPipe() As String = _texto.Split("||")
        Dim _celulaArrayVirgula() As String = _linhasArrayPipe(0).Split(",")
        Dim _celulas As String = String.Empty

        For Each _cel As String In _celulaArrayVirgula
            _celulas &= String.Format("<th>{0}</th>", _cel)
        Next

        Return String.Format("<tr>{0}</tr>{1}", _celulas, vbCrLf)
    End Function

    Friend Overridable Function GetGridData() As String
        Dim _texto As String = Me.Propriedade.Text
        Dim _linhasArrayPipe() As String = _texto.Split("||")
        Dim _linhas As String = String.Empty

        For i = 1 To (_linhasArrayPipe.Count - 1)
            Dim _celulaArrayVirgula() As String = _linhasArrayPipe(i).Split(",")
            Dim _celulas As String = String.Empty
            For Each _celula In _celulaArrayVirgula

                If _celula.Trim <> "" Then
                    _celulas &= String.Format("<td>{0}</td>", _celula)
                End If

            Next
            _linhas &= String.Format("<tr>{0}</tr>{1}", _celulas, vbCrLf)
        Next

        Return _linhas
    End Function

    Protected Function GetCSS() As String
        'Return String.Format("style=""position:fixed;right:{0}px;top:{1}px;""", Me.X, Me.Y)
        Return String.Format("style=""position:fixed;left:{0}px;top:{1}px;""", Me.X, Me.Y)
    End Function

    Friend Overridable Function GetTextInput() As String
        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<input type=""text"" value=""{0}"" id=""{1}"" {2} />", Me.Propriedade.Text, _id, _css)
    End Function


    Friend Overridable Function GetButton() As String
        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<input type=""button"" value=""{0}"" id=""{1}"" {2} />", Me.Propriedade.Text, _id, _css)
    End Function

    Friend Overridable Function GetTextArea() As String
        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<textarea rows=""4"" cols=""50"" id=""{0}"" {1}>{2}</textarea>", _id, _css, Me.Propriedade.Text)
    End Function

    Friend Overridable Function GetGrid() As String

        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<table border=""1"" id=""{2}"" {3}>{0}{1}</table>", GetGridHeader(), GetGridData(), _id, _css)
    End Function

    Friend Overridable Function GetCheckBox() As String

        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<input type=""checkbox"" value=""{0}"" id=""{1}"" {2} />", Me.Propriedade.Text, _id, _css)
    End Function

    Friend Overridable Function GetComboBox() As String
        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<select name=""nameSelect"" id=""{0}"" {1}>" & vbCrLf & Me.GetOptionsComboBox() & "</select>", _id, _css)
    End Function

    Protected Function LimpaCaracteresEspeciais(ByVal _limpeza As String) As String
        _limpeza = _limpeza.Replace("(", "")
        _limpeza = _limpeza.Replace(")", "")
        _limpeza = _limpeza.Replace("selected", "")
        _limpeza = _limpeza.Replace("disabled", "")
        _limpeza = _limpeza.Replace("-", "")
        _limpeza = _limpeza.Replace("\r", "")
        _limpeza = _limpeza.Trim
        Return _limpeza
    End Function

    Protected Function GetOptionsComboBox() As String

        Dim _texto As String = Me.Propriedade.Text
        Dim _linhasArrayPipe() As String = _texto.Split("||")
        Dim _linhas As String = String.Empty

        For i = 0 To (_linhasArrayPipe.Count - 1)
            Dim _option As String
            _option = Me.LimpaCaracteresEspeciais(_linhasArrayPipe(i))
            If _option.Trim <> "" Then
                _linhas &= String.Format("<option value=""{0}"">{0}</option>", _option)
            End If
        Next

        Return _linhas

    End Function

    Friend Overridable Function GetRadio() As String

        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<input type=""radio"" value=""{0}"" id=""{1}"" {2} />", Me.Propriedade.Text, _id, _css)
    End Function

    Friend Overridable Function GetLink() As String

        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<a href=""#"" id=""{0}"" {1}>{2}</a>", _id, _css, Me.Propriedade.Text)

    End Function

    Friend Overridable Function GetLabel() As String

        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<label id=""{0}"" {1}>{2}</label>", _id, _css, Me.Propriedade.Text)

    End Function

    Friend Overridable Function GetMenuBar() As String

        Dim _cssMenu As String = "<style>" & vbCrLf & "#menu ul {padding:0px;margin:0px;background-color:#EDEDED;list-style:none;}" & vbCrLf & "#menu ul li { display: inline; }" & vbCrLf & "#menu ul li a {padding: 2px 10px;display: inline-block;" & vbCrLf & "/* visual do link */" & vbCrLf & "background-color:#EDEDED;color: #333;text-decoration: none;border-bottom:3px solid #EDEDED;}" & vbCrLf & "#menu ul li a:hover {background-color:#D6D6D6;color: #6D6D6D;border-bottom:3px solid #EA0000;}" & vbCrLf & "</style>" & vbCrLf
        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("{0}<div id=""menu"" {1}>" & vbCrLf & "<ul><li><a href=""#"">Home</a></li><li><a href=""#"">Edit</a></li><li><a href=""#"">Help</a></li></ul>" & vbCrLf & "</div><br style:""clearM:both;"" />", _cssMenu, _css)

    End Function

    Protected Function GetTabVertical() As String

        Return String.Format("<pre><ajaxToolkit:TabContainer runat=""server"" OnClientActiveTabChanged=""ClientFunction"" Height=""{0}px"" Width=""{1}px"" ActiveTabIndex=""1"" OnDemand=""true"" /></pre>", Me.measuredH, Me.measuredW)

    End Function

    Friend Overridable Function GetList() As String

        Dim _css As String = String.Empty
        Dim _id As String = String.Empty

        If Me.UI.EhFixo Then
            _css = Me.GetCSS()
        End If

        _id = String.Format("{0}{1}", "rd", Me.ControlId)

        Return String.Format("<select name=""nameSelect"" multiple=""multiple"" size=""4"" id=""{0}"" {1}>" & vbCrLf & Me.GetOptionsComboBox() & "</select>", _id, _css)

    End Function


    Private _templateProvider As ITemplateProvider
    Public Overridable Property TemplateProvider() As ITemplateProvider
        Get
            Return _templateProvider
        End Get
        Set(ByVal value As ITemplateProvider)
            _templateProvider = value
        End Set
    End Property


    Public Overridable Function GerarHTML(ByVal _tipoTemplate As TipoTemplate) As String

        Dim _html As String

        Select Case _tipoTemplate
            Case TipoTemplate.HTML
                Me.TemplateProvider = New TemplateHTML
            Case TipoTemplate.AjaxControlToolkit
                Me.TemplateProvider = New TemplateAjaxControlToolkit
            Case TipoTemplate.HTMLEncoded
                Me.TemplateProvider = New TemplateHTMLEncoded
            Case Else
                Throw New NotImplementedException
        End Select

        'Return TemplatesAjaxControl.GetAccordion
        'Return "<div style='width:250px;height:250px;overflow:scroll;'><small>" & TemplatesAjaxControl.GetAccordionCode & "</small></div>"
        'Return "<textarea rows=""10"" cols=""30"">" & TemplatesAjaxControl.GetAccordionCode & "</textarea>"

        Select Case Me.TipoComponente
            Case MockupGenerator.TipoComponente.Accordion
                Return Me.TemplateProvider.GetAccordion(Me)
            Case MockupGenerator.TipoComponente.Alert
                Return Me.TemplateProvider.GetAlert(Me)
            Case MockupGenerator.TipoComponente.BarChart
                Return Me.TemplateProvider.GetBarChart(Me)
            Case MockupGenerator.TipoComponente.BreadCrumbs
                Return Me.TemplateProvider.GetBreadCrumbs(Me)
            Case MockupGenerator.TipoComponente.Button
                Return Me.TemplateProvider.GetButton(Me)
            Case MockupGenerator.TipoComponente.ButtonBar
                Return Me.TemplateProvider.GetButtonBar(Me)
            Case MockupGenerator.TipoComponente.Calendar
                Return Me.TemplateProvider.GetCalendar(Me)
            Case MockupGenerator.TipoComponente.CallOut
                Return Me.TemplateProvider.GetCallOut(Me)
            Case MockupGenerator.TipoComponente.Canvas
                Return Me.TemplateProvider.GetCanvas(Me)
            Case MockupGenerator.TipoComponente.CheckBox
                Return Me.TemplateProvider.GetCheckBox(Me)
            Case MockupGenerator.TipoComponente.CheckBoxGroup
                Return Me.TemplateProvider.GetCheckBoxGroup(Me)
            Case MockupGenerator.TipoComponente.ColorPicker
                Return Me.TemplateProvider.GetColorPicker(Me)
            Case MockupGenerator.TipoComponente.ColumnChart
                Return Me.TemplateProvider.GetColumnChart(Me)
            Case MockupGenerator.TipoComponente.ComboBox
                Return Me.TemplateProvider.GetComboBox(Me)
            Case MockupGenerator.TipoComponente.DataGrid
                Return Me.TemplateProvider.GetDataGrid(Me)
            Case MockupGenerator.TipoComponente.DateChooser
                Return Me.TemplateProvider.GetDateChooser(Me)
            Case MockupGenerator.TipoComponente.FieldSet
                Return Me.TemplateProvider.GetFieldSet(Me)
            Case MockupGenerator.TipoComponente.FormattingToolbar
                Return Me.TemplateProvider.GetFormattingToolbar(Me)
            Case MockupGenerator.TipoComponente.HelpButton
                Return Me.TemplateProvider.GetHelpButton(Me)
            Case MockupGenerator.TipoComponente.HorizontalScrollBar
                Return Me.TemplateProvider.GetHorizontalScrollBar(Me)
            Case MockupGenerator.TipoComponente.HRule
                Return Me.TemplateProvider.GetHRule(Me)
            Case MockupGenerator.TipoComponente.HSlider
                Return Me.TemplateProvider.GetHSlider(Me)
            Case MockupGenerator.TipoComponente.HSplitter
                Return Me.TemplateProvider.GetHSplitter(Me)
            Case MockupGenerator.TipoComponente.Icon
                Return Me.TemplateProvider.GetIcon(Me)
            Case MockupGenerator.TipoComponente.IconLabel
                Return Me.TemplateProvider.GetIconLabel(Me)
            Case MockupGenerator.TipoComponente.Image
                Return Me.TemplateProvider.GetImage(Me)
            Case MockupGenerator.TipoComponente.Label
                Return Me.TemplateProvider.GetLabel(Me)
            Case MockupGenerator.TipoComponente.Link
                Return Me.TemplateProvider.GetLink(Me)
            Case MockupGenerator.TipoComponente.LinkBar
                Return Me.TemplateProvider.GetLinkBar(Me)
            Case MockupGenerator.TipoComponente.List
                Return Me.TemplateProvider.GetList(Me)
            Case MockupGenerator.TipoComponente.Map
                Return Me.TemplateProvider.GetMap(Me)
            Case MockupGenerator.TipoComponente.MediaControls
                Return Me.TemplateProvider.GetMediaControls(Me)
            Case MockupGenerator.TipoComponente.MenuBar
                Return Me.TemplateProvider.GetMenuBar(Me)
            Case MockupGenerator.TipoComponente.ModalScreen
                Return Me.TemplateProvider.GetModalScreen(Me)
            Case MockupGenerator.TipoComponente.MultilineButton
                Return Me.TemplateProvider.GetMultilineButton(Me)
            Case MockupGenerator.TipoComponente.NumericStepper
                Return Me.TemplateProvider.GetNumericStepper(Me)
            Case MockupGenerator.TipoComponente.Paragraph
                Return Me.TemplateProvider.GetParagraph(Me)
            Case MockupGenerator.TipoComponente.PieChart
                Return Me.TemplateProvider.GetPieChart(Me)
            Case MockupGenerator.TipoComponente.PointyButton
                Return Me.TemplateProvider.GetPointyButton(Me)
            Case MockupGenerator.TipoComponente.RadioButton
                Return Me.TemplateProvider.GetRadioButton(Me)
            Case MockupGenerator.TipoComponente.RadioButtonGroup
                Return Me.TemplateProvider.GetRadioButtonGroup(Me)
            Case MockupGenerator.TipoComponente.RoundButton
                Return Me.TemplateProvider.GetRoundButton(Me)
            Case MockupGenerator.TipoComponente.SearchBox
                Return Me.TemplateProvider.GetSearchBox(Me)
            Case MockupGenerator.TipoComponente.SiteMap
                Return Me.TemplateProvider.GetSiteMap(Me)
            Case MockupGenerator.TipoComponente.StickyNote
                Return Me.TemplateProvider.GetStickyNote(Me)
            Case MockupGenerator.TipoComponente.SubTitle
                Return Me.TemplateProvider.GetSubTitle(Me)
            Case MockupGenerator.TipoComponente.Switch
                Return Me.TemplateProvider.GetSwitch(Me)
            Case MockupGenerator.TipoComponente.TabBar
                Return Me.TemplateProvider.GetTabBar(Me)
            Case MockupGenerator.TipoComponente.TagCloud
                Return Me.TemplateProvider.GetTagCloud(Me)
            Case MockupGenerator.TipoComponente.TextArea
                Return Me.TemplateProvider.GetTextArea(Me)
            Case MockupGenerator.TipoComponente.TextInput
                Return Me.TemplateProvider.GetTextInput(Me)
            Case MockupGenerator.TipoComponente.Title
                Return Me.TemplateProvider.GetTitle(Me)
            Case MockupGenerator.TipoComponente.TitleWindow
                Return Me.TemplateProvider.GetTitleWindow(Me)
            Case MockupGenerator.TipoComponente.Tooltip
                Return Me.TemplateProvider.GetTooltip(Me)
            Case MockupGenerator.TipoComponente.VerticalScrollBar
                Return Me.TemplateProvider.GetVerticalScrollBar(Me)
            Case MockupGenerator.TipoComponente.VerticalTabBar
                Return Me.TemplateProvider.GetVerticalTabBar(Me)
            Case MockupGenerator.TipoComponente.VideoPlayer
                Return Me.TemplateProvider.GetVideoPlayer(Me)
            Case MockupGenerator.TipoComponente.VolumeSlider
                Return Me.TemplateProvider.GetVolumeSlider(Me)
            Case MockupGenerator.TipoComponente.VSplitter
                Return Me.TemplateProvider.GetVSplitter(Me)
            Case Else
                Return ""
        End Select

        '"<input type=""text"" id="""" />"
        '"<input type=""checkbox"" value="""" id="""" />"
        '"<input type=""radio"" value="""" id="""" />"
        '"<input type=""file"" value="""" id="""" />"
        '"<input type=""image"" src="""" id="""" />"
        '"<input type=""password"" id="""" />"
        '"<textarea rows=""4"" cols=""50"">Conteudo.</textarea>"

        '"<select id="""" name=""nameSelect"">" & VbCrLf & "<option value=""volvo"">Volvo</option>" & VbCrLf & "</select>"

        '"<fieldset>" & VbCrLf & "<legend></legend>" & VbCrLf & "</fieldset>"

        '"<asp:TextBox runat=""server"" ID="""" Text=""""></asp:TextBox>"
        '"<asp:Button runat=""server"" ID="""" Text="""" />"
        '"<asp:Calendar runat=""server"" ID=""""></asp:Calendar>"

    End Function




#End Region

End Class

